Skip to content

[3.14] gh-145264: Do not ignore excess Base64 data after the first padded quad (GH-145267)#146326

Open
serhiy-storchaka wants to merge 1 commit intopython:3.14from
serhiy-storchaka:backport-4561f64-3.14
Open

[3.14] gh-145264: Do not ignore excess Base64 data after the first padded quad (GH-145267)#146326
serhiy-storchaka wants to merge 1 commit intopython:3.14from
serhiy-storchaka:backport-4561f64-3.14

Conversation

@serhiy-storchaka
Copy link
Member

@serhiy-storchaka serhiy-storchaka commented Mar 23, 2026

Base64 decoder (see binascii.a2b_base64(), base64.b64decode(), etc) no longer ignores excess data after the first padded quad in non-strict (default) mode. Instead, in conformance with RFC 4648, it ignores the pad character, "=", if it is present before the end of the encoded data.
(cherry picked from commit 4561f64)

…rst padded quad (pythonGH-145267)

Base64 decoder (see binascii.a2b_base64(), base64.b64decode(), etc)
no longer ignores excess data after the first padded quad in non-strict
(default) mode.  Instead, in conformance with RFC 4648, it ignores the
pad character, "=", if it is present before the end of the encoded data.
(cherry picked from commit 4561f64)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant